package com.totoro.author.author;

import javax.servlet.http.HttpSession ;

/**
 * @author 80002165 @date 2017年8月2日 上午10:20:11
 */
public enum CommonIdentifier implements Identify {
    ADMIN, AUTHOR ,TOURIST;
    @Override
    public boolean identify(HttpSession session) {
        if(session != null){
            String authorStr = (String) session.getAttribute("author") ;
            CommonIdentifier author = CommonIdentifier.valueOf(authorStr) ;
            if(this == author)
                return true ;
        }
        return false ;
    }
    
}
